﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="service_train.aspx.cs" Inherits="service_train" %>

<%@ Register src="uc/header.ascx" tagname="header" tagprefix="uc1" %>

<%@ Register src="uc/footer.ascx" tagname="footer" tagprefix="uc2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="css/base.css" rel="stylesheet" type="text/css" />
    <link href="css/service.css" rel="stylesheet" type="text/css" />
    <script src="Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
    <uc1:header ID="header1" runat="server" /><br />
    <div class="channelLayout">
        <!------ 客服专区 频道导航 start ------>
        <div class="topLine">
        </div>
        <div class="service_title service_bg">
        </div>
        <div class="channelNavBg">
            <div class="hqzx_nav_tb">
                <ul>
                    <li><a href="Default.aspx" class="b">客服首页</a></li>
                    <li><a href="service_video.aspx" class="b">培训视频</a></li>
                    <li><a href="servicehelp/index.aspx" target="_blank" class="b">帮助中心</a></li>
                    <li><a href="service_self.aspx" class="b">自助服务</a> </li>
                    <li><a href="service_feedback.aspx" class="b">意见反馈</a></li>
                    <li class="hqzx_nav_cur service_bg">各地公告</li>
                    <li><a href="training1.aspx" class="b">会场预约</a></li>
                    <li><a href="service_map1.aspx" class="b">全国服务商</a></li>
                </ul>
            </div>
        </div>
        <!------ 客服专区 频道导航 end ------>
    </div>
    <div class="clearok">
    </div>
    <!------ 客服专区 各地培训内容 start ------>
<div class="frame_train marginTop10">
  <div class="train_city">
    <ul id="citylist">
      <li><a id="beijing" href="javascript:" onclick="LoadthisTraning(this)">北京</a></li>
      <li><a id="shanghai" href="javascript:" onclick="LoadthisTraning(this)">上海</a></li>
      <li><a id="tianjing" href="javascript:" onclick="LoadthisTraning(this)">天津</a></li>
      <li><a id="chongqin" href="javascript:" onclick="LoadthisTraning(this)">重庆</a></li>
      <li><a id="anhui" href="javascript:" onclick="LoadthisTraning(this)">安徽</a></li>
      <li><a id="fujian" href="javascript:" onclick="LoadthisTraning(this)">福建</a></li>
      <li><a id="gansu" href="javascript:" onclick="LoadthisTraning(this)">甘肃</a></li>
      <li><a id="guangdong" href="javascript:" onclick="LoadthisTraning(this)">广东</a></li>
      <li><a id="guangxi" href="javascript:" onclick="LoadthisTraning(this)">广西</a></li>
      <li><a id="guizhou" href="javascript:" onclick="LoadthisTraning(this)">贵州</a></li>
      <li><a id="hainan" href="javascript:" onclick="LoadthisTraning(this)">海南</a></li>
      <li><a id="hebei" href="javascript:" onclick="LoadthisTraning(this)">河北</a></li>
      <li><a id="henan" href="javascript:" onclick="LoadthisTraning(this)">河南</a></li>
      <li><a id="heilong" href="javascript:" onclick="LoadthisTraning(this)">黑龙江</a></li>
      <li><a id="hubei" href="javascript:" onclick="LoadthisTraning(this)">湖北</a></li>
      <li><a id="hunan" href="javascript:" onclick="LoadthisTraning(this)">湖南</a></li>
      <li><a id="jilin" href="javascript:" onclick="LoadthisTraning(this)">吉林</a></li>
      <li><a id="jiangsu" href="javascript:" onclick="LoadthisTraning(this)">江苏</a></li>
      <br />
      <li><a id="jiangxi" href="javascript:" onclick="LoadthisTraning(this)">江西</a></li>
      <li><a id="liaoning" href="javascript:" onclick="LoadthisTraning(this)">辽宁</a></li>
      <li><a id="ningxia" href="javascript:" onclick="LoadthisTraning(this)">宁夏</a></li>
      <li><a id="qinghai" href="javascript:" onclick="LoadthisTraning(this)">青海</a></li>
      <li><a id="shandong" href="javascript:" onclick="LoadthisTraning(this)">山东</a></li>
      <li><a id="shanxi" href="javascript:" onclick="LoadthisTraning(this)">山西</a></li>
      <li><a id="shanxi1" href="javascript:" onclick="LoadthisTraning(this)">陕西</a></li>
      <li><a id="shenzhen" href="javascript:" onclick="LoadthisTraning(this)">深圳</a></li>
      <li><a id="sichuan" href="javascript:" onclick="LoadthisTraning(this)">四川</a></li>
      <li><a id="xinjiang" href="javascript:" onclick="LoadthisTraning(this)">新疆</a></li>
      <li><a id="yunnan" href="javascript:" onclick="LoadthisTraning(this)">云南</a></li>
      <li><a id="zhejiang" href="javascript:" onclick="LoadthisTraning(this)">浙江</a></li>
      <li><a id="xizang" href="javascript:" onclick="LoadthisTraning(this)">西藏</a></li>
      <li><a id="neimeng" href="javascript:" onclick="LoadthisTraning(this)">内蒙古</a></li>
    </ul>
    
  </div>
  <input type="hidden" id="hidarea" runat="server" />
  <div class="train_content" style="_height:560px;">
  <div class="region_list">
    <div  id="divtarget" ></div>        
    </div>
         <iframe id="IframeTraning" name="IframeTraning" width="100%" scrolling="no"  border="0" frameborder="0" framespacing="0"  marginheight="0" marginwidth="0" height="600" src=""></iframe>
  </div>
</div>
<!------ 客服专区 各地培训内容 end ------>
    <uc2:footer ID="footer1" runat="server" />

      <script type="text/javascript">
          var lastobj = null;
          function LoadthisTraning(obj) {
              $('#' + getQueryString("area")).attr('class', '');
              if (lastobj) {
                  lastobj.className = '';
              }
              obj.className = 'r';
              lastobj = obj;
              var area = $('#' + obj.id).html(); //obj.innerText;
              getTrainInfo(area);
          }
          function LoadthisTarget(obj, id, count, num) {
              for (var i = 1; i <= count; i++) {
                  if (i == num) {
                      $('#li' + i).attr('class', 'current');
                  }
                  else {
                      $('#li' + i).attr('class', '');
                  }
              }
              var frame = document.getElementById('IframeTraning');
              frame.onerror = function () {
                  this.src = "service_yuyue.aspx?id=" + id;
                  return;
              }
              frame.src = "service_yuyue.aspx?id=" + id;
          }

          window.onload = function () {
              var area = getQueryString("area");
              if (area == '') {
                  //area = "shanghai";
                  getTrainInfo('上海');
              }
              else {
                  $('#' + area).attr('class', 'r');
                  var area1 = $('#' + area).html();
                  getTrainInfo(area1);

                  $('#hidarea').val(area1);
              }
              var cityname = window.location.search.substr(1);
              if (cityname != '') {
                  cityname = unescape(cityname);
                  var lis = document.getElementById("citylist").childNodes;
                  if (lis) {
                      for (var i = 0; i < lis.length; i++) {
                          if (lis[i].childNodes[0].innerText == cityname) {
                              LoadthisTraning(lis[i].childNodes[0]);
                          }
                      }
                  }

              }
          }
          function getTrainInfo(area) {
              $.post('Handler/Train.ashx', { area: escape(area) }, function (data) {
                  $('#divtarget').html(data);
                  var id = $('#hidid').val();
                  var frame = document.getElementById('IframeTraning');
                  frame.onerror = function () {
                      this.src = "service_yuyue.aspx?id=" + id;
                      return;
                  }
                  frame.src = "service_yuyue.aspx?id=" + id;
              });
              
          }
          function getQueryString(key) {
              var querty_re = new RegExp("^[^\\?]*\\?(?:[^&]*&)*" + key + "=([^&]*)(?:[^&]*&?)*$", "ig");
              if (querty_re.test(top.location.href))
                  return top.location.href.replace(querty_re, "$1");
              return "";
          }
    </script>
    </form>
</body>
</html>
